home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d17 / lq15tsr.arc / SETUPPAN.ASM < prev    next >
Assembly Source File  |  1988-02-14  |  28KB  |  578 lines

  1. ;
  2. interrupts    segment at 0h                      ;interrupt table segment
  3.               org 9h*4
  4. keyboard_int  dw 2 dup (?)                       ;interrupt 9 vector
  5. interrupts    ends
  6. ;
  7. rom_bios_data segment at 40h                     ;ROM BIOS data area segment
  8.               org 60h
  9. ;
  10. cursor_mode   dw ?                      ;starting and ending cursor scan lines
  11. rom_bios_data ends
  12. ;
  13. rom           segment at 0F000h                  ;ROM segment
  14.               org 0FFFEh
  15. ;
  16. machine_id    db ?                ;ID byte identifies machine as PCjr or other
  17. rom           ends
  18. ;
  19. code          segment para public 'code'         ;code segment
  20.               assume cs:code
  21.               org 100h
  22. ;
  23. begin:        jmp initialize                     ;goto initialization routine
  24. ;
  25.               db '(C) Copyright 1986, Ziff-Davis Publishing Company ', 1Ah
  26.  
  27. shift_right   equ  1h
  28. shift_left    equ  2h
  29. shift_ctrl    equ  4h
  30. shift_alt     equ  8h 
  31. shift_trigger equ  shift_right+shift_left ; 
  32.  
  33. column_count  dw ?              ;width of window in columns 
  34. cursor_type   dw ?              ;cursor scan line definition 
  35. setup_status  db 0              ;indicator if printer window is already active
  36. display_mode  dw ?              ;current crt display mode 
  37. page_no       dw ?              ;current displayed page 
  38. attribute1    db 4Fh            ;window attribute bytes 
  39. attribute2    db 70h ; 
  40. display_table db 2Dh,29h        ;display re-enable values for modes 2 and 3 
  41. video         dw 0B800h,0B900h,0BA00h,0BB00h     ;starting addresses of video 
  42.                                                  ;memory for CGA pages 0 - 3
  43. ;
  44. mono_video    dw 0B000h                          ;video segment address for
  45.                                                  ;monochrome adapter
  46. ;
  47. old_kb_int              label dword
  48. old_keyboard_int        dw 2 dup (?)             ;storage for old keyboard
  49.                                                  ;interrupt vector
  50. ;
  51. ;----------------------------------------------------------------------------
  52. ;Text of the Printer Setup Menu window.
  53. ;After initialization, text and attribute bytes are combined and stored
  54. ;in the WINDOW_TEXT area, and this area is used to store the contents of
  55. ;the screen that underlie the window when the window is called up.
  56. ;----------------------------------------------------------------------------
  57. ;
  58. window_buffer           label word
  59. buffer_text             db 201,26 dup (205),187
  60.                         db 186,'    PRINTER SETUP MENU    ',186
  61.                         db 186,'  PANASONIC KXP-1091/2/3  ',186
  62.                         db 199,26 dup (196),182
  63.                         db 186,' F1    Compressed Mode    ',186
  64.                         db 186,' F2    Expanded Mode      ',186
  65.                         db 186,' F3    Emphasized Mode    ',186
  66.                         db 186,' F4    Quality Mode       ',186
  67.                         db 186,' F5    Elite/Pica Mode    ',186
  68.                         db 186,' F6    Miniature Mode     ',186
  69.                         db 186,' F7    Skip Perforation   ',186
  70.                         db 186,' F8    Form Feed/Line Feed',186
  71.                         db 186,' F9    Reset Top-of-Form  ',186
  72.                         db 186,' F10   Reset Print Modes  ',186
  73.                         db 186,' ESC   Exit               ',186
  74.                         db 199,26 dup (196),182
  75.                         db 186,' Unshifted:   Toggle ON   ',186
  76.                         db 186,' Shifted:     Toggle OFF  ',186
  77.                         db 200,26 dup (205),188
  78.                         db 532 dup (?)
  79. ;
  80. ;Storage area for the combination of text and attribute bytes that
  81. ;form the window image.
  82. ;
  83. window_bytes  label byte
  84. window_text   dw 532 dup (?)
  85. ;
  86. ;Control code strings for all of the printer setup options.
  87. ;
  88. code_table:   db 15,255,14 dup (0)                      ;compressed mode on .
  89.               db 27,87,31,255,12 dup (0)                ;expanded mode on   .
  90.               db 27,69,255,13 dup (0)                   ;emphasized mode on .
  91.               db 27,110,255,27,85,49,10 dup (0)         ;quality mode on    .
  92.               db 27,77,255,13 dup (0)                   ;elite mode on      .
  93.               db 15,27,83,0,27,65,6,255,8 dup (0)       ;miniature mode on  .
  94.               db 27,78,6,255,12 dup (0)                 ;perfskip on        .
  95.               db 12,255,14 dup (0)                      ;Form Feed          .
  96.  
  97.               db 27,64,255,13 dup (0)                   ;reset top-of-form  .
  98.               db 27,64,255,13 dup (0)                   ;reset print modes  .
  99. ;
  100.               db 18,255,14 dup (0)                      ;compress off       .
  101.               db 27,87,30,255,12 dup (0)                ;expand off         .
  102.               db 27,70,255,13 dup (0)                   ;emphasize off      .
  103.               db 27,80,255,27,85,48,10 dup (0)          ;quality mode  off  .
  104.               db 27,80,255,13 dup (0)                   ;pica  on           .
  105.               db 18,27,84,27,50,255,10 dup (0)          ;miniature off      .
  106.               db 27,79,255,13 dup (0)                   ;perfskip off       .
  107.               db 13,10,255,13 dup (0)                   ;line feed          .
  108. ;
  109. ;---------------------------------------------------------------------------
  110. ;Execution comes here, to the main body of the program, when an interrupt 9
  111. ;is generated from the keyboard.  Registers are saved, then the keypress is
  112. ;checked and compared to the key combination that activates the menu window.
  113. ;---------------------------------------------------------------------------
  114. ;
  115. main          proc near
  116.               sti                                ;enable software interrupts
  117.               push ax                            ;save all registers
  118.               push bx
  119.               push cx
  120.               push dx
  121.               push si
  122.               push di
  123.               push ds
  124.               push es
  125.               push ax                   ;save ax for call to old routine
  126.               in al,0A0h                         ;re-enable NMI on PCjr
  127.               pop ax                             ;restore ax
  128.               pushf          ;simulate interrupt call to old keyboard routine
  129.               call old_kb_int                    ;call old routine
  130.               mov ah,2                   ;check status of the shift keys
  131.               int 16h
  132.               and al,shift_trigger               ;trigger keys depressed?
  133.               cmp al,shift_trigger
  134.               je do_program                      ;yes, then skip exit routine
  135. ;
  136. ;Exit routine is the common point of exit for all routines in the program.
  137. ;
  138. exit:         pop es
  139.               pop ds
  140.               pop di
  141.               pop si
  142.               pop dx
  143.               pop cx
  144.               pop bx
  145.               pop ax
  146.               iret
  147. ;
  148. ;Execution comes here when the proper key combination, Ctrl/Rt-Shift, is
  149. ;pressed.  First task is to check whether or not the window is already open.
  150. ;
  151. do_program:   push cs                   ;set es and ds to the code segment
  152.               pop ds
  153.               push cs
  154.               pop es
  155.               cmp setup_status,0                 ;is the window already open?
  156.               jne exit                           ;yes, then ignore request
  157. ;
  158. ;----------------------------------------------------------------------------
  159. ;Check current video mode.  If it's mode 2, 3, or 7, then set the window
  160. ;status flag, store the mode number and page number, save the cursor type,
  161. ;and hide the cursor.  If any other display mode is active instead, ignore
  162. ;the request and exit.
  163. ;----------------------------------------------------------------------------
  164. ;
  165.               mov ah,15                          ;get page and mode numbers
  166.               int 10h                            ;al=mode, bh=page
  167.               cmp al,2                  ;is crt now in an acceptable mode?
  168.               je prog0                           ;yes, then continue
  169.               cmp al,3
  170.               je prog0
  171.               cmp al,7
  172.               je prog0
  173.               jmp exit                           ;no, then ignore reques
  174.  
  175. prog0:        mov setup_status,1                 ;set status flag tmZdicate
  176.                                                  ;that window is active
  177.               mov ah,0                           ;save mode number
  178.               mov display_mode,ax
  179.               push bx
  180.               mov bl,bh                 ;save page number for color displays
  181.               mov bh,0
  182.               mov page_no,bx
  183.               pop bx
  184.               mov ah,3                           ;get cursor type
  185.               int 10h
  186.               mov cursor_type,cx                 ;save it
  187.               mov ah,1                           ;hide the cursor until later
  188.               mov ch,20h
  189.               int 10h
  190. ;
  191. ;Preparatory routines are completed.  Now open the window by first saving the
  192. ;contents of video memory beneath the window and then writing the window text
  193. ;directly to memory.
  194. ;
  195.               mov bx,page_no             ;use bx as index into video segment
  196.                                          ;address table
  197.               cmp display_mode,7         ;manually adjust index for monochrome
  198.                                          ;adapter
  199.               jne prog1
  200.               mov bx,4
  201. prog1:        shl bx,1                           ;multiply bx by two since
  202.                                                  ;table is made up of words
  203.               mov ax,video[bx]                   ;read segment from table
  204.               mov ds,ax                          ;ds set to video memory
  205.               cmp display_mode,7                 ;skip disable if in mode 7
  206.               je prog2
  207.               call video_disable      ;turn display off for snow-free writing
  208. prog2:        lea di,window_buffer         ;set di to buffer area to save
  209.                                            ;screen contents
  210.               mov ch,28               ;define window dimensions and location
  211.               mov cl,19
  212.               mov dh,2
  213.               mov dl,26
  214.               call video2mem          ;then transfer screen contents to buffer
  215.               push ds                            ;set es to video memory
  216.               pop es
  217.               push cs                            ;reset ds to code segment
  218.               pop ds
  219.               lea si,window_text                 ;point si to window image
  220. prog3:        mov ch,28                          ;define window region
  221.               mov cl,19
  222.               mov dh,2
  223.               mov dl,26
  224.               call mem2video            ;and write the window to the display
  225.               cmp display_mode,7                 ;skip enable if in mode 7
  226.               je getkey
  227.               call video_enable                  ;re-enable the video display
  228. ;
  229. ;Window is now present on the screen, so wait for a keypress.
  230. ;
  231. getkey:      mov ah,0                           ;get a keypress
  232.               int 16h
  233.               cmp al,0                           ;is it an extended code?
  234.               je extended_code                   ;yes, go interpret it
  235.               cmp al,27                          ;is it the ESC key?
  236.               jne getkey1               ;no, then signal illegal keypress
  237. ;
  238. ;----------------------------------------------------------------------------
  239. ;Execution comes here when the ESC key is pressed.  The window is refilled
  240. ;with its original contents, the cursor is restored, and control is handed
  241. ;back to the application program.
  242. ;----------------------------------------------------------------------------
  243. ;
  244.               cmp display_mode,7                 ;skip disable if in mode 7
  245.               je prog4
  246.               call video_disable                 ;turn off the display
  247. prog4:        lea si,window_buffer               ;point si to the buffer area
  248.               mov ch,28                          ;define the window
  249.               mov cl,19
  250.               mov dh,2
  251.               mov dl,26
  252.               call mem2video     ;and write the buffer contents to the display
  253.               cmp display_mode,7                 ;skip enable if in mode 7
  254.               je prog5
  255.               call video_enable                  ;turn display back on
  256. prog5:        mov ah,1                           ;restore cursor
  257.               mov cx,cursor_type
  258.               int 10h
  259.               mov setup_status,0                 ;reset window status
  260.               jmp exit                           ;and exit
  261. ;
  262. ;Getkey1 routine handles an illegal keypress by beeping and returning
  263. ;for another.
  264. ;
  265. getkey1:      call beep                 ;beep and return for another keypress
  266.               jmp getkey
  267. ;
  268. ;An extended code has been entered...check its validity and goto the
  269. ;appropriate routine.
  270. ;
  271. extended_code:
  272.               cmp ah,59                          ;less than F1?
  273.               jb getkey1                         ;yes, then don't accept it
  274.               cmp ah,91                          ;greater than Shft-F8?
  275.               ja getkey1                         ;yes, then don't accept it
  276.               cmp ah,68                          ;between F1 and F10?
  277.               jbe unshifted                      ;yes
  278.               cmp ah,84                          ;between Shft-F1 and Shft-F9?
  279.               jae shifted                        ;yes
  280.               jmp getkey1     ;if all tests failed, then keypress was illegal
  281. ;
  282. ;----------------------------------------------------------------------------
  283. ;If a legal function key was pressed, its scan code is translated here to the
  284. ;starting address of the string of bytes to be sent to the printer.  The
  285. ;string is then sent to LPT1: provided it's powered on and on-line.
  286. ;----------------------------------------------------------------------------
  287. ;
  288. shifted:      sub ah,15                ;adjustment for shifted function keys
  289. unshifted:    sub ah,59                ;adjustment for unshifted function keys
  290.               mov al,ah                          ;convert index to word in ax
  291.               xor ah,ah
  292.               mov cl,4                           ;multiply ax by 16
  293.               shl ax,cl
  294.               add ax,offset code_table     ;convert ax to full offset address
  295.               mov si,ax                          ;and transfer it to si
  296.               call lpt1stat                      ;check for printer ready
  297.               jc getkey1                         ;beep if printer not ready
  298.               mov bl,255               ;specify delimiter for call to LPRINTZ
  299.               call lprintz             ;send control code string to printer
  300.               jmp getkey                         ;return for another keypress
  301. ;
  302. main          endp                               ;end of main body of program
  303. ;
  304. ;---------------------------------------------------------------------------
  305. ;VIDEO_ENABLE and VIDEO_DISABLE routines manipulate bit 3 of port 3D8h,
  306. ;the CGA Mode Control Register, to temporarily turn the display on or off.
  307. ;Since these routines write directly to hardware, they have no effect on
  308. ;other video adapters.
  309. ;---------------------------------------------------------------------------
  310. ;
  311. video_disable proc near
  312.               mov dx,3DAh                        ;read CGA status port
  313. disable1:     in al,dx                  ;wait for vertical retrace to occur
  314.               test al,8                          ;is bit 3 set?
  315.               je disable1                        ;no, wait until it is
  316.               mov dx,3D8h                        ;now disable the display
  317.               mov al,25h      ;by clearing bit 3 of the Mode Control Register
  318.               out dx,al
  319.               ret
  320. video_disable endp
  321. ;
  322. video_enable  proc near
  323.               mov dx,3D8h                        ;CGA Mode Control Register
  324.               mov bx,display_mode        ;get value to re-enable display
  325.               sub bx,2
  326.               mov al,display_table[bx]
  327.               out dx,al                          ;and send it to the port
  328.               ret
  329. video_enable  endp
  330. ;
  331. ;---------------------------------------------------------------------------
  332. ;VIDEO2MEM routine transfers the contents of a portion of video memory
  333. ;to memory buffer for storage.
  334. ;Entry:       DS    - video segment
  335. ;             ES:DI - memory buffer
  336. ;             DH,DL - row and column of upper left corner of window
  337. ;             CH    - width of window in columns
  338. ;             CL    - number of lines in window
  339. ;---------------------------------------------------------------------------
  340. ;
  341. video2mem     proc near
  342.               mov al,ch                          ;store number of columns
  343.               mov ah,0
  344.               mov column_count,ax
  345.               mov ch,0                           ;cx = number of lines
  346.               push di                            ;save di
  347.               call video_offset         ;get cell address of first character
  348.               mov si,di                          ;put it in si
  349.               pop di                             ;restore di
  350. v2mem1:       push si                            ;save si for next line
  351.               push cx                            ;save line count
  352.               mov cx,column_count                ;set cx for call to WRITELN
  353.               call writeln                       ;transfer one line
  354.               pop cx                             ;restore saved registers
  355.               pop si
  356.               add si,160                         ;set si for next line address
  357.               loop v2mem1               ;loop until all lines are done
  358.               ret
  359. video2mem     endp
  360. ;
  361. ;---------------------------------------------------------------------------
  362. ;MEM2VIDEO writes a selected area of memory to the video display.
  363. ;Entry:       DS:SI - memory buffer
  364. ;             ES    - video segment
  365. ;             DH,DL - row and column of upper left corner of window
  366. ;             CH    - width of window in columns
  367. ;             CL    - number of lines in window
  368. ;------------------------------------------m-$------------------------------
  369. ;
  370. mem2video     proc near
  371.               mov al,ch                          ;save number of columns
  372.               mov ah,0
  373.               mov column_count,ax
  374.               mov ch,0                           ;cx = number of lines
  375.               call video_offset                  ;get offset into video memory
  376. mem2v1:       push di                            ;save video starting address
  377.               push cx                            ;save line count
  378.               mov cx,column_count                ;set cx for call to WRITELN
  379.               call writeln                       ;transfer one line
  380.               pop cx                             ;restore registers
  381.               pop di
  382.               add di,160                         ;set di for next display line
  383.               loop mem2v1                        ;loop until done
  384.               ret
  385. mem2video     endp
  386. ;
  387. ;---------------------------------------------------------------------------
  388. ;VIDEO_OFFSET calculates the offset into video memory of a character cell.
  389. ;Entry:       DH,DL - row and column of cell (0-24,0-79)
  390. ;Exit:        DI    - offset address
  391. ;---------------------------------------------------------------------------
  392. ;
  393. video_offset  proc near
  394.               mov al,160
  395.               mul dh                             ;row * 160
  396.               shl dl,1                           ;column * 2
  397.               mov dh,0                           ;byte to word
  398.               add ax,dx                          ;(row *160)+(column*2)
  399.               mov di,ax                          ;set offset in di
  400.               ret
  401. video_offset  endp
  402. ;
  403. ;---------------------------------------------------------------------------
  404. ;WRITELN subroutine copies a string of words from one memory location to
  405. ;another.  The CGA status port is not checked for vertical retrace status
  406. ;before transfer.
  407. ;Entry:       DS:SI - source
  408. ;             ES:DI - destination
  409. ;             CX    - number of words
  410. ;---------------------------------------------------------------------------
  411. ;
  412. writeln       proc near
  413.               cld                       ;clear for string instructions
  414. write1:       movsw                              ;move one word
  415.               loop write1                        ;loop until done
  416.               ret
  417. writeln       endp
  418. ;
  419. ;---------------------------------------------------------------------------
  420. ;LPRINTZ routine sends a string of bytes delimited by a user-specified byte to
  421. ;LPT1: thru INT 17h.
  422. ;Entry:       DS:SI - string address
  423. ;             BL    - delimiter (0-255)
  424. ;---------------------------------------------------------------------------
  425. ;
  426. lprintz       proc near
  427.               cld                                ;for 8088 string instructions
  428. lprintz1:     lodsb                              ;get one byte
  429.               cmp al,bl                          ;is it the delimiter?
  430.               je lprintz2                        ;yes, then exit
  431.               mov dx,0                           ;printer no. 0 (LPT1:)
  432.               mov ah,0
  433.               int 17h                            ;send byte to printer
  434.               jmp lprintz1                       ;return for next byte
  435. lprintz2:     ret
  436. lprintz       endp
  437. ;
  438. ;---------------------------------------------------------------------------
  439. ;LPT1STAT checks the current status of printer LPT1:.  If it's either
  440. ;powered off or off-line, then an error condition is signalled upon return
  441. ;thru the carry flag.
  442. ;Exit:        Carry clear - no error
  443. ;             Carry set   - error
  444. ;---------------------------------------------------------------------------
  445. ;
  446. lpt1stat      proc near
  447.               mov dx,0                  ;printer no. 0
  448.               mov ah,2                  ;use ROM BIOS 'get status' function
  449.               int 17h
  450.               test ah,8                 ;test bit 3, I/O error indicator
  451.               je stat1                  ;if clear, then no error
  452.               stc                       ;raise error flag
  453.               ret
  454. stat1:        clc                       ;clear error flag
  455.               ret
  456. lpt1stat      endp
  457. ;
  458. ;---------------------------------------------------------------------------
  459. ;BEEP uses the 8253 timer chip to emit a short beep thru the PC's speaker.
  460. ;---------------------------------------------------------------------------
  461. ;
  462. beep          proc near
  463.               mov al,182          ;notify 8253 that frequency data is coming
  464.               out 67,al
  465.               mov al,0                           ;send frequency (776.8 Hz)
  466.               out 66,al
  467.               mov al,6
  468.               out 66,al
  469.               in al,97                           ;activate speaker
  470.               or al,3
  471.               out 97,al
  472.               mov cx,6000h                  ;time delay for sound duration
  473. beep1:        loop beep1
  474.               in al,97                           ;deactivate speaker
  475.               and al,252
  476.               out 97,al
  477.               ret
  478. beep          endp
  479. ;
  480. ;---------------------------------------------------------------------------
  481. ;MEM2MEM subroutine transfers a non-overlapping block of memory one byte
  482. ;at a time.
  483. ;Entry:       DS:SI - source
  484. ;             ES:DI - destination
  485. ;             CX    - number of bytes
  486. ;---------------------------------------------------------------------------
  487. ;
  488. mem2mem       proc near
  489.               cld
  490. mem1:         movsb                              ;transfer one byte
  491.               loop mem1                          ;and loop until done
  492.               ret
  493. mem2mem       endp
  494. ;
  495. ;---------------------------------------------------------------------------
  496. ;Initialization routine sets up the window image in the WINDOW_TEXT area,
  497. ;resets the CURSOR_MODE word if this is a PCjr, and saves and replaces the
  498. ;old keyboard interrupt vector.
  499. ;---------------------------------------------------------------------------
  500. ;
  501. initialize    proc near
  502. ;
  503. ;Initialize the window text area by combining the text data with the attribute
  504. ;bytes and placing the conglomeration in the WINDOW_TEXT area.
  505. ;
  506.               assume ds:code,es:code
  507.               mov ah,15                          ;check the current video mode
  508.               int 10h
  509.               cmp al,7          ;if it's mode 7, then replace the attribute
  510.               jne init0          ;bytes with ones appropriate for mono adapter
  511.               mov attribute1,70h
  512.               mov attribute2,07h
  513. init0:        cld                  ;now combine the text and attribute bytes
  514.               lea si,buffer_text                 ;point si to table of text
  515.               lea di,window_bytes                ;and di to storage area
  516.               mov cx,112           ;create first four lines by combining
  517.               mov al,attribute1          ;text with attribute1 (112 words)
  518. init1:        movsb                              ;text byte
  519.               stosb                              ;attribute byte
  520.               loop init1                 ;loop until all 112 words are done
  521.               mov cx,11                          ;now do the next 11 lines
  522. init2:        push cx              ;first attribute in each line is attribute1
  523.               movsb
  524.               stosb
  525.               mov cx,26            ;next 26 attributes are attribute2
  526.               mov al,attribute2
  527. init3:        movsb
  528.               stosb
  529.               loop init3
  530.               movsb
  531.               mov al,attribute1     ;and the last in each line is attribute1
  532.               stosb
  533.               pop cx
  534.               loop init2            ;loop until all 11 lines are done
  535.               mov cx,112            ;create the last four lines just like
  536. init4:        movsb                 ;the first four
  537.               stosb
  538.               loop init4
  539. ;
  540. ;Check the machine ID byte in ROM and if this is a PCjr, then reset the
  541. ;cursor and correct the CURSOR_MODE word at 0040:0060.
  542. ;
  543.               mov ax,rom                         ;set ds to rom
  544.               mov ds,ax
  545.               assume ds:rom
  546.               cmp machine_id,0FDh                ;is this a PCjr?
  547.               jne init5                          ;no, then skip this routine
  548.               mov ax,rom_bios_data               ;set ds to ROM BIOS data area
  549.               mov ds,ax
  550.               assume ds:rom_bios_data
  551.               mov cursor_mode,0607h          ;reset the cursor mode indicator
  552.               mov ah,1                       ;then physically reset the cursor
  553.               mov cx,0607h
  554.               int 10h
  555. ;
  556. ;Now save the old keyboard interrupt vector and replace it with the new one.
  557. ;
  558. init5:        mov ax,interrupts          ;set ds to the interrupt vector area
  559.               mov ds,ax
  560.               assume ds:interrupts
  561.               mov ax,keyboard_int                ;save old vector
  562.               mov old_keyboard_int,ax
  563.               mov ax,keyboard_int[2]
  564.               mov old_keyboard_int[2],ax
  565.               cli                        ;disable all interrupts but NMI
  566.               mov keyboard_int,offset main       ;and install new vector
  567.               mov keyboard_int[2],cs
  568.               sti                                ;re-enable interrupts
  569.               mov dx,offset initialize   ;point dx to end of resident section
  570.               int 27h                            ;terminate-but-stay-resident
  571. initialize    endp
  572. ;
  573. code          ends
  574.               end begin
  575.  
  576.  
  577. Press any key to continue...
  578.